package com.atguigu.paymentdemo.controller;

import com.atguigu.paymentdemo.config.WxPayConfig;
import com.atguigu.paymentdemo.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author longge
 * @Title:
 * @Description:
 * @date 2023/2/5 12:13
 */
@Api(tags = "测试控制器")
@RestController
@RequestMapping("/api/test")
public class TestController {

    @Autowired
    private WxPayConfig wxPayConfig;

    @ApiOperation("获取微信支付配置文件")
    @GetMapping
    private R getWxPayConfig(){
        return R.ok().data("wxpayConfig",wxPayConfig.getAppid());
    }
}
